package cn.com.wangluotongxin.admin.eureka;

import cn.com.wangluotongxin.admin.eureka.fallback.AdminClientFallback;
import cn.com.wangluotongxin.admin.eureka.form.*;
import cn.com.wangluotongxin.admin.model.AdminMerchantsInfo;
import cn.com.wangluotongxin.common.web.AjaxResult;
import cn.com.wangluotongxin.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "wltx-admin-api", fallback = AdminClientFallback.class, configuration = FeignConfiguration.class)
public interface AdminClient {

    /**
     * 申请商户信息
     */
    @PostMapping("/adminapi/inner/merchants/info/add")
    AjaxResult<AdminMerchantsInfo> applyMerchants(@RequestBody MerchantsInfoAddForm form);

    /**
     * 撤销商户申请
     */
    @PostMapping("/adminapi/inner/merchants/apply/cancel")
    AjaxResult cancelApply(@RequestBody CancelMerchantApplyForm form);

    /**
     * 添加系统消息
     */
    @PostMapping("/adminapi/inner/sys/message/add")
    AjaxResult addSysMessage(@RequestBody AddSysMessageForm form);

    /**
     * 商品发布上线
     */
    @PostMapping("/adminapi/inner/goods/info/release")
    AjaxResult goodsInfoRelease(@RequestBody GoodsInfoReleaseForm form);

    /**
     * 商品发布撤回
     */
    @PostMapping("/adminapi/inner/goods/info/recall")
    AjaxResult goodsInfoRecall(@RequestBody GoodsInfoRecallForm form);
}
